Skip to content

Conversation

einalien
Copy link
Owner

@einalien einalien commented Nov 8, 2026 •

Summary

This PR introduces two independent GitHub Actions destruction workflows for TEST and STAGE while preserving the existing combined TEST/STAGE and dedicated PROD destruction workflows.

The change provides more granular control over infrastructure cleanup without modifying previously tested workflows.

Changes

Independent Destruction Workflows

  • Added .github/workflows/destroy-test.yml for TEST-only destruction.
  • Added .github/workflows/destroy-stage.yml for STAGE-only destruction.
  • Restricted both workflows to manual execution from main.
  • Configured environment-specific credentials and Kubernetes remote-state validation.
  • Preserved reverse dependency order: frontend before network.
  • Implemented saved OpenTofu destruction plans and temporary-file cleanup.
  • Retained the shared infrastructure-deployment concurrency group.

Existing Workflows

  • Preserved destroy.yml for combined TEST and STAGE destruction.
  • Preserved destroy-prod.yml for independently authorized PROD destruction.
  • Kept the existing PROD human approval requirements unchanged.

Documentation

  • Updated README.md to describe the destruction architecture, workflow responsibilities, and infrastructure lifecycle.

Destruction Architecture

Workflow Target Authorization
destroy-test.yml TEST only Manual trigger
destroy-stage.yml STAGE only Manual trigger
destroy.yml TEST + STAGE Manual trigger
destroy-prod.yml PROD only Manual trigger + human approval

Validation

  • CI checks passed.
  • Existing combined TEST/STAGE destruction previously verified.
  • Existing PROD destruction and recreation previously verified.
  • Independent TEST and STAGE workflows implemented.
  • Independent TEST destruction and recreation verified.
  • Independent STAGE destruction and recreation verified.

@einalien einalien added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 8, 2026
@einalien einalien self-assigned this Nov 8, 2026
@einalien einalien merged commit 29c1933 into main Nov 8, 2026
1 check passed
@einalien einalien deleted the feat/cd-separate-destroy-workflows branch November 8, 2026 21:43
Sign in to join this conversation on GitHub.
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant